package com.wm.task2.util;

public class CreateId {
    private static final String PATH = "D:/java/study/test/BBS/id.txt";
    private static Integer id = 0;

    public static int getId() {
        String result =  ManageFile.readFile(PATH);
        if(!result.isEmpty()){
            id = Integer.parseInt(result);
        }
        id++;
        ManageFile.writerFile(PATH,id.toString(),false);
        return id;
    }

}
